const Ajax = window.ajaxBusinessContract;

//常量
export const apiConstant = (params) => Ajax.request(`/v1/constant`, 'get', '', {
  showLoading: true
});

//合同详情
export const apiContrantinfo = (params) => Ajax.request(`/v1/business/contract/detail`, 'post', params, {
  showLoading: true
});

//代付款合同列表
export const apiContrantPayList = (params) => Ajax.request(`/v1/business/pending/payment/contract`, 'post', params, {
  showLoading: true
});
//合同列表
export const apiContrantList = (params) => Ajax.request(`/v1/business/contract/query`, 'post', params, {
  showLoading: true
});
//合同新增
export const apiContrantAdd = (params) => Ajax.request(`/v1/business/contract/create`, 'post', params, {
  showLoading: true
});
//合同更新
export const apiContrantUpdate = (params) => Ajax.request(`/v1/business/contract/update`, 'post', params, {
  showLoading: true
});

//字典多个查询
export const apiDictMoreList = (param) => Ajax.request(`/v1/basic/dict/listByTypes`, 'post', param);

//字典单个
export const dictList = (param) => Ajax.request(`/v1/basic/dict/list`, 'post', param);

//项目
export const apiProjectList = (param) => Ajax.request(`/v1/business/contract/project`, 'post', param, {
  showLoading: true
});

//商铺 isUse 1 || 不传
export const apiShopList = (param) => Ajax.request(`/v1/business/contract/shop`, 'post', param);

//停车场
export const apiParkList = (param) => Ajax.request(`/v1/business/contract/carPark`, 'post', param);

//广告位
export const apiAdvertList = (param) => Ajax.request(`/v1/business/contract/ad`, 'post', param);

//外面的账单列表
export const apiOutBillList = (param) => Ajax.request(`/v1/business/bill/list`, 'post', param, {
  showLoading: true
});

//合同里面的账单
export const apiBillList = (param) => Ajax.request(`/v1/business/bill/list`, 'post', param, {
  showLoading: true
});

//当前登陆人的部门
export const apiDepartment = (param) => Ajax.request(`/v1/business/employee/org/list`, 'post', param, {
  showLoading: true
});

//合同里面的账单详情
export const apiBillInfo = (param) => Ajax.request(`/v1/business/bill/detail`, 'post', param, {
  showLoading: true
});

//合同里面的审批账单详情
export const apiApproveBillInfo = (param) => Ajax.request(`/v1/business/process/bill/detail`, 'post', param, {
  showLoading: true
});

//新增付款记录
export const apiAddPayRecord = (param) => Ajax.request(`/v1/contract/payment/apply`, 'post', param, {
  showLoading: true
});


//新增付款记录
export const apiAddPayRecordV2 = (param) => Ajax.request(`/v1/contract/payment/applyV2`, 'post', param, {
  showLoading: true
});

//支出类付款记录
export const apiPayPayRecord = (param) => Ajax.request(`/v1/contract/payment/record`, 'post', param, {
  showLoading: true
});

//收入类付款记录
export const apiIncomePayRecord = (param) => Ajax.request(`/v1/income/contract/payment/record`, 'post', param, {
  showLoading: true
});

//出账确认
export const apiUpdateBill = (param) => Ajax.request(`/v1/business/bill/update`, 'post', param, {
  showLoading: true
});

//剩余未付金额
export const apiUnpaidAmount = (param) => Ajax.request(`/v1/business/unpaid/amount`, 'post', param, {
  showLoading: true
});

//关联验收单
export const apiAcceptance = (param) => Ajax.request(`/v1/business/acceptance/list`, 'post', param, {
  showLoading: true
});

//废止合同
export const apiAbolishContracrt = (param) => Ajax.request(`/v1/business/contract/termination`, 'post', param, {
  showLoading: true
});

//合同提交前校验计划相关
export const apiVerifyPlan = (param) => Ajax.request(`/v1/business/plan/contract/verify`, 'post', param, {
  showLoading: true
});

//校验保存
export const apiVerifyPlanSave = (param) => Ajax.request(`/v1/business/plan/focus/create`, 'post', param, {
  showLoading: true
});

//验收单列表
export const apiCheckBillList = (param) => Ajax.request(`/v1/acceptance/list`, 'post', param, {
  showLoading: true
});

//验收单新增
export const apiCheckBillAdd = (param) => Ajax.request(`/v1/business/acceptance/create`, 'post', param, {
  showLoading: true
});

//验收单详情
export const apiCheckBillInfo = (param) => Ajax.request(`/v1/business/acceptance/detail`, 'post', param, {
  showLoading: true
});

//验收单删除
export const apiCheckBillDelete = (param) => Ajax.request(`/v1/business/acceptance/delete`, 'post', param, {
  showLoading: true
});

//付款详情
export const apiPayInfo = (param) => Ajax.request(`/v1/contract/payment/detail`, 'post', param, {
  showLoading: true
});

//合同废止详情
export const apiAbolishContractInfo = (param) => Ajax.request(`/v1/business/contract/termination/detail`, 'post', param, {
  showLoading: true
});

//发起方数据源
export const apiInitiate = (param) => Ajax.request(`/v1/basic/partner/partner/list`, 'post', param);

//流程流程所有意见
export const apiAllOption = (param) => Ajax.request(`/v1/contract/process/business/getAllMessage`, 'post', param, {
  showLoading: true
});
// export const apiAllOption = (param) => Ajax.request(`/v1/contract/process/business/getMessage`, 'post', param, {
//   showLoading: true
// });

//流程意见
export const apiOption = (param) => Ajax.request(`/v1/contract/process/business/getMessage`, 'post', param, {
  showLoading: true
});

//保存补充协议变化的数据
export const apiSaveSupplement = (param) => Ajax.request(`/v1/basic/update/contract/update/batch/create`, 'post', param, {
  showLoading: true
});

//更新信息
export const apiContractLog = (param) => Ajax.request(`/v1/business/contract/updateInfo/list`, 'post', param, {
  showLoading: true
});

//支出类合同付款计划收费项的数据源
export const apiSourceCharge = (param) => Ajax.request(`/v1/business/matterName/list`, 'post', param, {
  showLoading: true
});

//重点关注列表
export const apiVitalList = (param) => Ajax.request(`/v1/business/plan/focus/list`, 'post', param, {
  showLoading: true
});

//合同里的关联合同
export const apiLinkContract = (param) => Ajax.request(`/v1/basic/contract/contract/list`, 'post', param, {
  showLoading: true
});

//功能分区下拉
export const apiPartitionList = (param) => Ajax.request(`/v1/business/query/spacePartition`, 'post', param, {
  showLoading: true
});

//楼层下拉
export const apiFloornList = (param) => Ajax.request(`/v1/business/query/floor`, 'post', param, {
  showLoading: true
});

//支出子类下拉,收费项下啦
export const apiPaysonList = (param) => Ajax.request(`/v1/business/chargeItem/list`, 'post', param, {
  showLoading: false
});

//设备系统下拉
export const apiSystemList = (param) => Ajax.request(`/v1/business/query/system`, 'post', param, {
  showLoading: true
});

//临时场地合同的区域下拉  projectKey
export const apiAreaList = (param) => Ajax.request(`/v1/business/query/spacePartition`, 'post', param, {
  showLoading: false
});

//活动空间下拉 projectKey  spacePartitionKey
export const apiActivitySpaceList = (param) => Ajax.request(`/v1/business/query/activitySpace`, 'post', param, {
  showLoading: true
});

//活动空间下拉 projectKey  spacePartitionKey
export const apiProjectDetail = (param) => window.ajaxbusinessAssets.request(`/v1/basic/project/project/detail`, 'post', param, {
  showLoading: true
});

//资产编码的list
export const apiAssetCodeList = (param) => Ajax.request(`/v1/business/contract/asset/list`, 'post', param, {
  showLoading: false
});

//业态
export const listByMapBizId = (param) => window.ajaxbusinessAssets.request(`/v1/business/category/listByMapBizId`, 'post', param, {
  showLoading: true
});
//品牌
export const categoryList = (param) => window.ajaxbusinessAssets.request(`/v1/business/category/list`, 'post', param, {
  showLoading: false
});
//查税(管理费 分成租金 固定租金等)
export const apiRateList = (param) => Ajax.request(`/v1/business/taxRate/list`, 'post', param, {
  showLoading: false
});

//根据资产查指导单价
export const apiGetGuideUnitPrice = (param) => Ajax.request(`/v1/business/rent/guidePrice`, 'post', param, {
  showLoading: false
});

//支出合同申请付款的事项
export const apiGetPayContractCharge = (param) => Ajax.request(`/v1/business/payment/item/list`, 'post', param, {
  showLoading: false
});

//历史合同
export const apiContractHistoryList = (param) => Ajax.request(`/v1/business/contract/historyList`, 'post', param, {
  showLoading: true
});

//新合同账单
export const apiContractBillList = (param) => Ajax.request(`/v1/business/bill/listV2`, 'post', param, {
  showLoading: true
});

//支出明细 ｜ 付款记录
export const apiPaymentRecordList = (param) => Ajax.request(`/v1/contract/payment/record/list`, 'post', param, {
  showLoading: true
});

//当期合同
export const apiBusinessContractList = (param) => Ajax.request(`/v1/business/contract/list`, 'post', param, {
  showLoading: true
});

//合同详情
export const apiBusinessContractDetail = (param) => Ajax.request(`/v1/business/contract/detailV2`, 'post', param, {
  showLoading: true
});

//合同附件
export const apiBusinessContractAttachment = (param) => Ajax.request(`/v1/business/contract/attachment`, 'post', param, {
  showLoading: true
});

//品牌
export const apiCategoryList = (params) => window.ajaxbusinessAssets.request(`/v1/business/category/list`, 'post', params, {
  showLoading: true
});

//统计合同数量旧版
export const apiContractCountOld = (params) => Ajax.request(`/v1/business/contract/count`, 'post', params, {
  showLoading: true
});

//统计合同数量
export const apiContractCount = (params) => Ajax.request(`/v1/business/contract/countV2`, 'post', params, {
  showLoading: true
});

//设备树
export const apiEquipmentTree = (params) => Ajax.request(`/v1/business/contract/device/tree`, 'post', params, {
  showLoading: false
});

//设施树
export const apiFacilityTree = (params) => Ajax.request(`/v1/business/contract/station/tree`, 'post', params, {
  showLoading: false
});

//新建合同
export const apiAddContract = (params) => Ajax.request(`/v1/business/contract/info/create`, 'post', params, {
  showLoading: true
});

//新建合同
export const apiUpdateContract = (params) => Ajax.request(`/v1/business/contract/info/update`, 'post', params, {
  showLoading: true
});

//合同详情
export const apiContractInfo = (params) => Ajax.request(`/v1/business/contract/info/detail`, 'post', params, {
  showLoading: true
});

//支出合同详情
export const apiContractPayInfo = (params) => Ajax.request(`/v1/business/contract/expendContractDetail`, 'post', params, {
  showLoading: true
});

//我的合同
export const apiMyContract = (params) => Ajax.request(`/v1/business/my/contract/list`, 'post', params, {
  showLoading: true
});

//解析账单
export const apiAnalysisFile = (params) => Ajax.request(`/v1/business/bill/importBill`, 'post', params, {
  showLoading: true
});

//账单下载模板
export const apiAnalysisDownload = (params) => Ajax.download(`/v1/business/bill/exportBill`, params, {
  showLoading: true,
  responseType: 'blob'
});

//查询账单
export const apiContractBillBaseList = (params) => Ajax.request(`/v1/basic/commercialcontract/bill/bill/list`, 'post', params, {
  showLoading: true
});

//退租详情
export const apiContractReturnInfo = (params) => Ajax.request(`/v1/business/return/rent/detail`, 'post', params, {
  showLoading: true
});

//退租中的账单
export const apiBillReturnList = (params) => Ajax.request(`/v1/business/bill/return/list`, 'post', params, {
  showLoading: true
});

//退租协议保存
export const apiBillReturnSave = (params) => Ajax.request(`/v1/business/return/rent/save`, 'post', params, {
  showLoading: true
});

//退租协议更新
export const apiBillReturnUpdate = (params) => Ajax.request(`/v1/business/return/rent/update`, 'post', params, {
  showLoading: true
});